<style>
.headinfo {
    background: none;
}
.headinfo .mod-member {
    margin: 0 auto;
	margin-top: -60px;
    width: 94%;
	left:3%;
    padding: 6px 0 10px;
    background-color: #fff;
    border-radius: 10px;
    border: 1px solid #f2f2f2;
}
.headinfo .mod-member .sign-btn{
    position: absolute;
    margin: 0 auto;
	top: -44px;
    width: 36px;
	height: 26px;
	right:16px;
    color:#fff;
	text-align:center;
	padding-top:3px;
    background: {{main.syscolor || '#7c1cc9'}};
}
.bottombg {bottom:-20px;width:100%;height:80px;border-bottom-right-radius:100% 40px;border-bottom-left-radius:100% 40px;}
.mod-group {
    margin: 0 auto;
	margin-top: 5px;
    width: 94%;
    background-color: #fff;
    border-radius: 10px;
    border: 1px solid #f2f2f2;
}
.fui-icon-group .fui-icon-col-sm {
    margin:10px 0;
}
.fui-cell-group .fui-cell:before {
	border-top: 0px solid #e8e9eb;
}
.times-list {position:relative;padding-left:24rpx}
.times-list .item {position:relative;height:auto}
.times-list .item .fui-cell {
	margin-left:1.5rem
}
.times-list .item .icon-done {
	width: 0.45rem;
    height: 0.45rem;
    z-index: 2;
    background-color: #cccccc;
    border-radius: 50%;
    position: absolute;
	left:0rpx;
	margin-top:0.7rem;
}
.times-list .itemno .icon-done {
	width: 0.4rem;
    height: 0.4rem;
    z-index: 2;
    background-color: #cccccc;
    border-radius: 50%;
    position: absolute;
	left:0rpx;
	margin-top:0.7rem;
}
.times-list .item .f2f2f2 {
	background-color: #f2f2f2;
}
.times-list .itemno .f2f2f2 {
	background-color: #f2f2f2;
}
.times-list .item .icon-line{
	content: "";
    width: 0.1rem;
    position: absolute;
    top: 0.7rem;
	left: 0.2rem;
	bottom:-0.7rem;
    background: #f2f2f2;
    z-index: 1;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

</style>
<div class='fui-page fui-page-current' ng-if="pagedata.op=='main'">
	<div class='fui-content member-page'>
		<div class="bottombg" style="background:{{main.syscolor || '#7c1cc9'}}"></div>
			<div class="headinfo" style="height:auto;">	
				<div class="mod-member">
					<div class="sign-btn" href="javascript:;" ng-click="access_json('jy_scrm/member.item/remark/id='+pagedata.item.id)" style="background:{{main.syscolor || '#7c1cc9'}};z-index:8">备注</div>
						<div class="headinfo" style="background:none;padding:0;color:#999">
												<div class="child userinfo" style="padding-bottom:5px;color:#999;width:4rem">
													<div class="face" style="margin-right:0.6rem;padding: 0.1rem;">
															<img ng-src="{{tomedia(pagedata.item.avatar) || '../core/resource/images/gw-user.png'}}" />
															<span class="vip" style="top: 2rem;background: {{main.syscolor || '#7c1cc9'}} none repeat scroll 0 0;"><i class="icon icon-vip5" style="font-size:0.5rem;padding-left:0.1rem"></i></span>
													</div>
												</div>
												<div class="child userinfo" style="padding-bottom:0;color:#999;flex: 1;text-align:left;">
													<div ng-if="pagedata.noloading" class="l bold" style="width:100%">{{pagedata.item.name || ''}}</div>
													<div ng-if="pagedata.noloading" class="l" style="font-size:0.65rem"><span style="color:{{main.syscolor || '#7c1cc9'}}"> {{pagedata.user_buystatus[pagedata.item.buystatus] || '无'}}</span></div>
													<div ng-if="pagedata.noloading" class="l">
														<a style="width:100%;color:#666;font-size:0.65rem" href="javascript:;" href="tel:{{pagedata.item.mobile}}">手机: {{pagedata.item.mobile || '无'}} <i class="icon icon-phone" style="font-size:0.65rem"></i></a>
														<div style="">
														<span>{{pagedata.item.email}}</span>
														</div>
													</div>
													<div ng-if="!pagedata.noloading" class='infinite-loading' style="text-align:left;"><span class='fui-preloader'></span><span class='text'> 正在加载...</span></div>
												</div>
						</div>
						<div class="fui-icon-group noborder  col-4">
												<div class="fui-icon-col-sm external">
													<div href="javascript:;">
														<div class="text bold">{{pagedata.item.daygenjinnum || '0'}}</div>
														<div class="subtitle" style="color: #666;">跟进次数</div>
													</div>
												</div>
												<div class="fui-icon-col-sm external">
													<div>
														<div class="text bold">{{pagedata.item.dayliushinum || '0'}}小时</div>
														<div class="subtitle" style="color: #666;">跟进时长</div>
													</div>
												</div>
												<div class="fui-icon-col-sm external">
													<div>
														<div class="text bold">{{pagedata.item.star || '0'}}分</div>
														<div class="subtitle" style="color: #666;">客户评分</div>
													</div>
												</div>
												<div class="fui-icon-col-sm external">
													<div>
														<div class="text bold">{{pagedata.item.daygenjinnum || '0'}}</div>
														<div class="subtitle" style="color: #666;">客户成长值</div>
													</div>
												</div>
						</div>
					</div>
				</div>
			<div class="weui_btn_area" style="margin-top:0.5rem">
					 <a class="weui_btn weui_btn_primary" href="javascript:" ng-click="access_json('jy_scrm/member.item/set/id='+pagedata.item.id)">跟进客户</a>
			</div>
			<div class="fui-cell-group fui-cell-click mod-group" style="padding-bottom:0.6rem">
					<a class="fui-cell external" href="javascript:;">
								<div class="fui-cell-text bold" style="font-size:1rem;">跟进简报</div>
								<div class="fui-cell-remark" ng-click="access_json('jy_scrm/member.item/set/id='+pagedata.item.id)">+跟进</div>
					</a>
					<div class="fui-cell-group" style="margin-top:0">
								<div class="fui-tab fui-tab-danger" style="top:0.7rem">
									<a ng-class="{'external active':pagedata.optype == 'log'}" ng-click="pagedata.optype='log';tool.get_list('jy_scrm/member.item/log/id='+pagedata.item.id,true)">跟进记录</a>
									<a ng-class="{'external active':pagedata.optype == ''}" ng-click="pagedata.optype='';tool.get_list('jy_scrm/member.item/log/istop=1&id='+pagedata.item.id,true)">重点记录</a>
									<a ng-class="{'external active':pagedata.optype == 'hua'}" ng-click="pagedata.optype='hua';pagedata.getorder()">客户画像</a>
								</div>
								<div class="fui-tab-scroll" ng-if="pagedata.statuslist.length>0" style="height:2rem">
									<div ng-repeat="item in pagedata.statuslist" ng-class="{'item':1,'active':pagedata.buystatus == $index}" style="line-height:1.8rem;padding: 0.1rem 0.6rem;" ng-click="pagedata.buystatus=$index">{{item.title}}</div>
								</div>
					</div>
					<div ng-if="pagedata.optype != 'hua'" style="margin-top:-0.15rem;padding-right:0;padding-left:0.5rem">
						<div class="times-list" ng-repeat="item in pagedata.list">
							<div class="item">
								<div class="icon-done {{i == 0 || i+1 == item.list.length ? '':'f2f2f2'}}"></div>
								<div class="{{i+1 == item.list.length ? '':'icon-line'}}"></div>
								<div class="fui-cell" style="margin-left:1rem;padding:1rem 1.5rem 0.6rem 0;border-bottom: 1px solid #f0f0f0;">
									<div class="fui-cell-text" style="opacity: 0.8;">
										<div>
											<span class="yuyuetime">{{date(item.createtime)}}</span>
										</div>
										<div class="text black" style="color:{{main.syscolor || '#7c1cc9'}};margin-top:0.3rem">{{item.worker.name}}</div>
										<div class="l-f text black" style="width:100%;margin-top:0.3rem">
											<span class="l-f overflow-h" style="max-width:10rem">
												{{item.content || '无记录内容'}}
											</span>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="content-empty" ng-show="!pagedata.list || pagedata.list.length == 0" style="margin-top:1rem">
						  <i class="icon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">暂时没有跟进记录！</p>
						</div>
					</div>
					<div ng-if="pagedata.optype == 'hua'" class="fui-cell-group" style="margin-top:-1rem">
						<div class="fui-cell">
								<div class="fui-cell-label"></div>
								<div class="fui-cell-text">客户消费情况({{pagedata.order.moneyall || 0.00}} + )</div>
						</div>
						<div class="fui-icon-group noborder  col-4">
												<div class="fui-icon-col-sm external">
													<div href="javascript:;">
														<div class="text bold">{{pagedata.order.day || '0'}}笔</div>
														<div class="subtitle" style="color: #666;">今日下单数</div>
													</div>
												</div>
												<div class="fui-icon-col-sm external">
													<div>
														<div class="text bold">{{pagedata.order.moneyday || '0.00'}}元</div>
														<div class="subtitle" style="color: #666;">今日下单数</div>
													</div>
												</div>
												<div class="fui-icon-col-sm external">
													<div>
														<div class="text bold">{{pagedata.order.all || '0'}}笔</div>
														<div class="subtitle" style="color: #666;">总订单数</div>
													</div>
												</div>
												<div class="fui-icon-col-sm external">
													<div>
														<div class="text bold">{{pagedata.order.moneyall || '0.00'}}元</div>
														<div class="subtitle" style="color: #666;">总成交额</div>
													</div>
												</div>
						</div>
						<div class="fixed-title" style="margin-top:1rem">
							 <span class="befirst spacing">
								 <span class="icon icon-fengexianzuo" style="font-size:2rem;color:#666"></span>
							 </span> 
							 <span class="title-text bold" style="color:#333;line-height:2rem">他的订单</span> 
							 <span class="spacing">
								 <span class="icon icon-fengexianyou" style="font-size:2rem;color:#666"></span>
							 </span>
						</div>
						<div class="fui-list-group order-item" ng-repeat="item in pagedata.list">
							<a class="fui-list external" style="padding: 0.42rem 0.5rem">
								<div class="fui-list-inner">
									<div class="subtitle"> 订单号: {{item.ordersn}}</div>
								</div>
								<div class="row-remark text-cancel" style="width: 4rem; font-size: 0.65rem;text-align: right;">{{item.statustitle}}</div>
								<div class="angle"></div>
							</a> 
								<div ng-repeat="m in item.merchs">
									<a ng-if="m.id" href="javascript:;" data-nocache="true" ng-click="access_json('jy_weishop/merch//id='+m.id)">
										<div class="fui-list-group-title lineblock bold">
											<i class="icon jinyunicon icon-dianpu"></i> {{m.merchname || '多商户'}}
											<span class="status noremark" style="font-size:0.50rem" ><i class="icon jinyunicon icon-icon-test"></i></span>
										</div>
									</a>
									<a ng-if="!m.id" href="javascript:;" data-nocache="true" ng-click="access_json('jy_weishop/index/')">
										<div class="fui-list-group-title lineblock bold">
											<i class="icon jinyunicon icon-dianpu"></i> {{pagedata.shopset.store_title || '平台自营'}}
											<span class="status noremark" style="font-size:0.50rem" ><i class="icon jinyunicon icon-icon-test"></i></span>
										</div>
									</a>
									<a href="javascript:;" ng-repeat="g in m.goods" class="external">
										<div class="fui-list goods-list">
											<div class="fui-list-media" style="">
												<img class="" ng-src="{{tomedia(g.image) || '../core/resource/images/nopic.jpg'}}">
											</div>
											<div class="fui-list-inner">
												<div class="text goodstitle towline">{{g.title}}</div>
												<div class="text" style="color:#f60;font-size:0.60rem">{{g.selespename || '无规格'}} x {{g.total || 1}} /{{g.unit ||'件'}}<span ng-if="g.weight!='0.00'"> ({{g.weight}}kg)</span></div>
												<div class="text"><i class="fui-tag fui-tag-red">{{item.buytypetitle}}</i></div>
												
											</div>
											<div class="fui-list-angle" style="width:auto">
												<div>￥<span class="marketprice syscolorred">{{g.price}}</span></div>
												<div class="subtitle" ng-if="pagedata.feemoney.isopen==1">{{pagedata.feemoney.tag ||'节省'}}￥{{g.feemoney || '0.00'}}</div>
											</div>
										</div>
									</a>
								</div>
							<div class="fui-list-group-title lineblock">
								<span style="color:#999;font-size:0.65rem"><i class="icon jinyunicon icon-shijian" style="color:#f60;font-size:0.60rem"></i> {{item.createtime}}</span>
								<span class="status noremark">共 <span>{{item.total}}</span> 个商品 实付: <span class="text-danger">￥{{item.price}}</span></span>
							</div>
							<div ng-if="item.addprice!='0.00'" class="title" style="padding:0 0.5rem">
							<div ng-if="item.addprice!='0.00'"><i class="icon icon-trade" style="font-size: 0.65rem"> 多退少补：<span class="price red">￥{{item.addprice || '0.00'}}</span><span class="gray" ng-if="item.addprice<0">(确认收货后退差价)</span></i> <div ng-if="item.addprice>0 && item.ispayadd!=1" class="btn btn-sm btn-success-o order-finish" style="border-radius: 1rem;padding:0 0.5rem" href="javascript:" ng-click="pagedata.payaddprice(item.id);">补差价</div></div>
							</div>
							<div ng-if="pagedata.feemoney.isopen==1" class="fui-list" style="padding-top:0">
									<div class="fui-list-info noremark">
										<span class="syscolorred">本单共节省 ￥{{item.feemoney}} <span class="subtitle">（真实商品节省，不含优惠折扣）</span></span>
									</div>
							</div>
						</div>
						<div class="content-empty" ng-show="!pagedata.list || pagedata.list.length == 0 " style="margin-top:1rem;margin-bottom:1rem">
							<i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">暂时没有订单！</p>
						</div>
					</div>
			</div>			
			<div ng-include="sys_html('common/_copyright',true)"></div>
			<div ng-if="pagedata.item.genjintime" class="fui-navbar-tip">上次跟进:<red>{{pagedata.item.genjintime}}</red>,<span ng-if="pagedata.item.nextgenjintime">下次跟进时间:<red>{{pagedata.item.nextgenjintime}}</red></span> <span ng-if="pagedata.item.yuqidays" class="red">你已逾期{{pagedata.item.yuqidays}}天</span></div>
	</div>
</div>
<div id="show_vipcard" class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
		<div class="modal-dialog" style="top:30%;">
			<div class="memlogo-area" style="background:url({{tomedia(pagedata.item.cardbg) || '../core/resource/images/cardbg.png'}}) no-repeat 100%">
                    <div class="memlogo">
                        <img ng-src="{{tomedia(pagedata.item.avatar) || '../core/resource/images/gw-user.png'}}">
                    </div>
                    <div class="name">{{pagedata.item.nickname || '匿名'}}</div>
                    <br>
                    <div class="name">{{pagedata.item.mobile || '无手机号'}}</div>
                    <div class="code">
                        <img ng-src="{{tomedia(pagedata.account.logo) || '../core/resource/images/wxappicon.png'}}">
                    </div>
                    <div class="bot">
						<img id="barcode" style="height:2.5rem"/>
                        <span class="r-f">{{pagedata.item.level}}</span>
                    </div>
            </div>
		</div>
</div>
<div class='fui-page  fui-page-current' ng-if="pagedata.op=='set'">
    <div class="fui-header">
		<div class="title">跟进信息</div> 
		<div class="fui-header-right">&nbsp;</div>
	</div>
	<div class='fui-content'>
		<div class="fui-cell-group">
			<div class="fui-cell must">
				<div class="fui-cell-label ">客户名称</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' readonly="true" ng-model="pagedata.item.name"/></div>
			</div>
			<div class="fui-cell must ">
				<div class="fui-cell-label ">跟进状态</div>
				<div class="fui-cell-info">
					<select ng-model="pagedata.post.buystatus" class="tpl-province">
						<option value="" selected="selected">选择状态</option>
						<option ng-repeat="(k,v) in pagedata.user_buystatus" value="{{k}}" ng-selected="pagedata.post.buystatus==k">{{v}}</option>
					</select>
				</div>
				<div class="fui-cell-remark">
				</div>
			</div>
			<div class='fui-cell'>
			 <div class='fui-cell-label'>客户评分</div>
				 <div class='fui-cell-info'>
					 <div class="fui-stars warning">
						 <span class="stars">
									<i ng-class="{'icon':1, 'icon-shoucang-tianchong selected':pagedata.post.star>0,'icon-shoucang':pagedata.post.star<1}" ng-click="pagedata.post.star=1"></i>
									<i ng-class="{'icon':1, 'icon-shoucang-tianchong selected':pagedata.post.star>1,'icon-shoucang':pagedata.post.star<2}" ng-click="pagedata.post.star=2"></i>
									<i ng-class="{'icon':1, 'icon-shoucang-tianchong selected':pagedata.post.star>2,'icon-shoucang':pagedata.post.star<3}" ng-click="pagedata.post.star=3"></i>
									<i ng-class="{'icon':1, 'icon-shoucang-tianchong selected':pagedata.post.star>3,'icon-shoucang':pagedata.post.star<4}" ng-click="pagedata.post.star=4"></i>
									<i ng-class="{'icon':1, 'icon-shoucang-tianchong selected':pagedata.post.star>4,'icon-shoucang':pagedata.post.star<5}" ng-click="pagedata.post.star=5"></i>
						</span>
					 </div>
				 </div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-label bold" style="font-size:0.8rem;width:100px;">信息录入</div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-info c000">
						<textarea rows="5" placeholder="50字以内（选填）" ng-model="pagedata.post.content"></textarea>
				</div>
			</div>
		</div>
		<div class="weui_cells">
		    <div class="weui_cell weui_cell_switch" style="padding-left:0.5rem">
						<div class="weui_cell_hd">属重点记录？</div>
						<div class="weui_cell_bd weui_cell_primary">
							<input class="weui_switch" type="checkbox" ng-value="ifelse(pagedata.post.istop==1,true,false)" ng-click="toogle(pagedata.post,'istop',[1,0])" />
						</div>
			</div>
			<div class="weui_cell" style="padding-left:0.5rem">
                <div class="weui_cell_hd">下次跟进</div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="datetime-local" ng-model="pagedata.post.nexttime" placeholder="下次跟进的时间，默认2天后">
                </div>
            </div>		
		</div>
		<a href='javascript:;' ng-click="post(pagedata.post,'set')" class='btn btn-info block'>确认提交</a>
	</div>
</div>
<div class='fui-page  fui-page-current' ng-if="pagedata.op=='remark'">
    <div class="fui-header">
		<div class="title">用户备注</div> 
		<div class="fui-header-right">&nbsp;</div>
	</div>
	<div class='fui-content'>
		<div class="fui-cell-group">
			<div class="fui-cell must">
				<div class="fui-cell-label">备注公司</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="填写公司名等" ng-model="pagedata.post.remark_company"/></div>
			</div>
			<div class="fui-cell must">
				<div class="fui-cell-label">备注电话</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="备注电话" ng-model="pagedata.post.remark_mobiles[0]"/></div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-label">出生日期</div>				
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.post.birth.year" class="form-control tpl-province">
								<option value="" selected="selected">年</option>
								<option ng-repeat="value in pagedata.years" value="{{value}}" ng-selected="pagedata.post.birth.year==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.post.birth.month" class="form-control tpl-city">
								<option value="" selected="selected">月</option>
								<option ng-repeat="value in pagedata.months" value="{{value}}" ng-selected="pagedata.post.birth.month==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.post.birth.day" class="form-control tpl-district">
								<option value="" selected="selected">日</option>
								<option ng-repeat="value in pagedata.days" ng-show="showday(pagedata.post.birth.year,pagedata.post.birth.month,value)" value="{{value}}" ng-selected="pagedata.post.birth.day==value">{{value}}</option>
								</select>
							</div>
				
			</div>
			<div class="fui-cell">
				<div class="fui-cell-label">结婚纪念日</div>
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.post.jiehun.year" class="form-control tpl-province">
								<option value="" selected="selected">年</option>
								<option ng-repeat="value in pagedata.years" value="{{value}}" ng-selected="pagedata.post.jiehun.year==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.post.jiehun.month" class="form-control tpl-city">
								<option value="" selected="selected">月</option>
								<option ng-repeat="value in pagedata.months" value="{{value}}" ng-selected="pagedata.post.jiehun.month==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:28%">
								<select ng-model="pagedata.post.jiehun.day" class="form-control tpl-district">
								<option value="" selected="selected">日</option>
								<option ng-repeat="value in pagedata.days" ng-show="showday(pagedata.post.jiehun.year,pagedata.post.jiehun.month,value)" value="{{value}}" ng-selected="pagedata.post.jiehun.day==value">{{value}}</option>
								</select>
							</div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-label">首次下单日</div>			
							<div class="fui-cell-label" style="width:25%">
								<select ng-model="pagedata.post.buyday.year" class="form-control tpl-province">
								<option value="" selected="selected">年</option>
								<option ng-repeat="value in pagedata.years" value="{{value}}" ng-selected="pagedata.post.buyday.year==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:25%">
								<select ng-model="pagedata.post.buyday.month" class="form-control tpl-city">
								<option value="" selected="selected">月</option>
								<option ng-repeat="value in pagedata.months" value="{{value}}" ng-selected="pagedata.post.buyday.month==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:25%">
								<select ng-model="pagedata.post.buyday.day" class="form-control tpl-district">
								<option value="" selected="selected">日</option>
								<option ng-repeat="value in pagedata.days" ng-show="showday(pagedata.post.buyday.year,pagedata.post.buyday.month,value)" value="{{value}}" ng-selected="pagedata.post.buyday.day==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:25%">
								<div class="form-control">
								<input type="text" class='fui-input' placeholder="购买商品" ng-model="pagedata.post.buyday.goods"/>
								</div>
							</div>
			</div>
			<div class="fui-cell" ng-repeat="item in pagedata.post.buydays" ng-if="item!='no'">
					<div class="fui-cell-label">下单日</div>
							<div class="fui-cell-label" style="width:25%">
								<select ng-model="item.year" class="form-control tpl-province">
								<option value="" selected="selected">年</option>
								<option ng-repeat="value in pagedata.years" value="{{value}}" ng-selected="item.year==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:25%">
								<select ng-model="item.month" class="form-control tpl-city">
								<option value="" selected="selected">月</option>
								<option ng-repeat="value in pagedata.months" value="{{value}}" ng-selected="item.month==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:25%">
								<select ng-model="item.day" class="form-control tpl-district">
								<option value="" selected="selected">日</option>
								<option ng-repeat="value in pagedata.days" ng-show="showday(item.year,item.month,value)" value="{{value}}" ng-selected="item.day==value">{{value}}</option>
								</select>
							</div>
							<div class="fui-cell-label" style="width:25%">
								<div class="form-control">
									<input type="text" class='fui-input' placeholder="购买商品" ng-model="item.goods"/>
								</div>
							</div>
			</div>
			<div class="fui-cell">
					<div class="fui-cell-info">
						<a class="label label-info" style="padding:0.3rem 0.5rem;font-size:0.7rem" href='javascript:;'  ng-click="pagedata.addindex=pagedata.addindex+'1';pagedata.post.buydays[pagedata.addindex]={'year':2021,'month':8,'day':1};">+ 下单日</a>
					</div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-label bold" style="font-size:0.8rem;width:auto;">其他信息备注</div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-info c000">
						<textarea rows="5" placeholder="50字以内（选填）" ng-model="pagedata.post.remark"></textarea>
				</div>
			</div>		
		</div>
		<a href='javascript:;' ng-click="post(pagedata.post,'remark')" class='btn btn-info block'>确认提交</a>
	</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
scope.pagedata.addindex='add';
require(['JsBarcode'],function(JsBarcode){
	//console.log('准备调用');
	JsBarcode('#barcode',scope.pagedata.item.id,{fontSize:36});
});
if(scope.pagedata.item && scope.pagedata.item.id){
	scope.tool.get_list('jy_scrm/member.item/log/id='+scope.pagedata.item.id,true);
}
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_scrm/member.item/log/id='+scope.pagedata.item.id);
}
setTimeout(function(){
if(scope.pagedata.op!='main'){
	return false;
}
wx.invoke('getContext', {
}, function(res){
        if(res.err_msg == "getContext:ok"){
            var entry  = res.entry ;
			//scope.message('entry'+entry);
			if(entry=='contact_profile' || entry=='single_chat_tools' || entry=='group_chat_tools'){
				wx.invoke('getCurExternalContact', {	
				}, function(res) {
					if (res.err_msg == 'getCurExternalContact:ok') {
						var userId  = res.userId ;
						//scope.message('userId'+userId);
						scope.get('jy_scrm/member.item/main/userid='+userId,function(res){
							if(!res.item.id){
								scope.message('没有获取到该客户信息，请先确保后台已经：同步客户！');
								return false;
							}
							scope.tool.get_list('jy_scrm/member.item/log/id='+res.item.id,true);
							scope.pagedata.item=res.item;
							scope.pagedata.noloading=true;
							scope.$evalAsync();
						});
					}else{
						scope.message('获取客户信息失败：'+res.err_msg);
					}
				});
			}
        }else {
		   if(scope.config.isagentConfig!=1){
				scope.message('加载agentConfig失败！');
		   }
		   if(res.err_msg=='getContext:fail_nopermission'){
				scope.message('获取场景失败(没有权限，请检查该员工有没有对外客户的权限:进入“客户联系”-“权限配置”-“使用范围”页面，管理员设置哪些人可使用联系客户功能，如未配置，则无法调用相关接口)：'+res.err_msg);
		   }else{
				scope.message('获取场景失败(没有权限，请检查该员工有没有对外客户的权限:进入“客户联系”-“权限配置”-“使用范围”页面，管理员设置哪些人可使用联系客户功能，如未配置，则无法调用相关接口)：'+res.err_msg);
		   }
        }
		scope.pagedata.noloading=true;
		scope.$evalAsync();
});
},1000);
scope.pagedata.getorder=function(){
	scope.get('jy_scrm/member.item/getorder/',function(res){
			scope.pagedata.order=res.order;
			scope.$evalAsync();
			scope.tool.get_list('jy_scrm/member.item/getorderlist/',true);
	});
}
scope.pagedata.scroll_bottom=function(){
	if(scope.pagedata.optype == 'hua'){
		scope.tool.get_list('jy_scrm/member.item/getorderlist/');
	}
}
</script>